doc fix
authorHavoc Pennington <hp@pobox.com>
Tue, 1 Jan 2002 17:44:46 +0000 (17:44 +0000)
committerHavoc Pennington <hp@src.gnome.org>
Tue, 1 Jan 2002 17:44:46 +0000 (17:44 +0000)
2002-01-01  Havoc Pennington  <hp@pobox.com>

* gtk/gtktextview.c (gtk_text_view_get_default_attributes): doc
fix

2002-01-01  Havoc Pennington  <hp@pobox.com>

* gtk/tmpl/gtktexttag.sgml: docs updates, mention that invisible
property isn't implemented

* gtk/text_widget.sgml: small tweaks

docs/reference/ChangeLog
docs/reference/gtk/text_widget.sgml
docs/reference/gtk/tmpl/gtktexttag.sgml
gtk/gtktextview.c

index 00dd737b7d16ca4463e2723d1b960122ebe81521..d32fb22e00b183ea816e9590f086038ebcbbb73f 100644 (file)
@@ -1,3 +1,10 @@
+2002-01-01  Havoc Pennington  <hp@pobox.com>
+
+       * gtk/tmpl/gtktexttag.sgml: docs updates, mention that invisible 
+       property isn't implemented
+
+       * gtk/text_widget.sgml: small tweaks
+
 2001-12-30  Matthias Clasen  <matthiasc@poet.de>
 
        * gtk/tmpl/gtkbbox.sgml: Remove references to nonexisting functions.
index b56b94426242a69dbc7717fda677253e6672fa69..e7ed7a1628a97cb171bacc6cc2f15001ffa1f406 100644 (file)
@@ -103,11 +103,14 @@ between the old and new positions).
 </para>
 
 <para>
-Text buffers always contain at least one line, but may be empty (that is,
-buffers can contain zero characters). The last line in the text buffer never
-ends in a line separator (such as newline); the other lines in the buffer always
-end in a line separator. Line separators count as characters when computing
-character counts and character offsets.
+Text buffers always contain at least one line, but may be empty (that
+is, buffers can contain zero characters). The last line in the text
+buffer never ends in a line separator (such as newline); the other
+lines in the buffer always end in a line separator. Line separators
+count as characters when computing character counts and character
+offsets. Note that some Unicode line separators are represented with 
+multiple bytes in UTF-8, and the two-character sequence "\r\n" is also
+considered a line separator.
 </para>
 
 </refsect1>
index f007f6b58c6b8dcd660146761a22e4b8f9e698c8..e4b9f1897fc9a3c853bd001023e998d1a828b37c 100644 (file)
@@ -13,7 +13,18 @@ types related to the text widget and how they work together.
 </para>
 
 <para>
+Tags should be in the #GtkTextTagTable for a given #GtkTextBuffer
+before using them with that buffer.
+</para>
 
+<para>
+gtk_text_buffer_create_tag() is the best way to create tags.
+See <application>gtk-demo</application> for numerous examples.
+</para>
+
+<para>
+The "invisible" property was not implemented for GTK+ 2.0; it's
+planned to be implemented in future releases.
 </para>
 
 <!-- ##### SECTION See_Also ##### -->
@@ -32,17 +43,23 @@ types related to the text widget and how they work together.
 Describes a type of line wrapping.
 </para>
 
-@GTK_WRAP_NONE: 
-@GTK_WRAP_CHAR: 
-@GTK_WRAP_WORD: 
+@GTK_WRAP_NONE: do not wrap lines; just make the text area wider
+@GTK_WRAP_CHAR: wrap text, breaking lines anywhere the cursor can
+                appear (between characters, usually - if you want to
+                be technical, between graphemes, see
+                pango_get_log_attrs())
+@GTK_WRAP_WORD: wrap text, breaking lines in between words
 
 <!-- ##### STRUCT GtkTextAttributes ##### -->
 <para>
-
+Using #GtkTextAttributes directly should rarely be necessary. It's
+primarily useful with gtk_text_iter_get_attributes(). As with most
+GTK+ structs, the fields in this struct should only be read, never
+modified directly.
 </para>
 
-@refcount: 
-@appearance: 
+@refcount: private field, ignore
+@appearance: pointer to sub-struct containing certain attributes
 @justification: 
 @direction: 
 @font: 
@@ -183,7 +200,7 @@ Describes a type of line wrapping.
 
 <!-- ##### ARG GtkTextTag:name ##### -->
 <para>
-Name of the tag, or NULL for anonymous tags. Can only be set
+Name of the tag, or %NULL for anonymous tags. Can only be set
 when the tag is created.
 </para>
 
@@ -199,12 +216,12 @@ Foreground color as a string such as "red" or "#FFFFFF".
 
 <!-- ##### ARG GtkTextTag:background-gdk ##### -->
 <para>
-Background color, as a #GdkColor.
+Background color, as a #GdkColor. The color need not be allocated.
 </para>
 
 <!-- ##### ARG GtkTextTag:foreground-gdk ##### -->
 <para>
-Foreground color as a #GdkColor.
+Foreground color as a #GdkColor. The color need not be allocated.
 </para>
 
 <!-- ##### ARG GtkTextTag:background-stipple ##### -->
@@ -229,42 +246,48 @@ Font as a #PangoFontDescription.
 
 <!-- ##### ARG GtkTextTag:family ##### -->
 <para>
-
+Font family as a string.
 </para>
 
 <!-- ##### ARG GtkTextTag:style ##### -->
 <para>
-
+Font style as a #PangoStyle, e.g. #PANGO_STYLE_ITALIC.
 </para>
 
 <!-- ##### ARG GtkTextTag:variant ##### -->
 <para>
-
+Font variant as a #PangoVariant, e.g. #PANGO_VARIANT_SMALL_CAPS.
 </para>
 
 <!-- ##### ARG GtkTextTag:weight ##### -->
 <para>
-
+Font weight as an integer, see predefined values in #PangoWeight; 
+for example, #PANGO_WEIGHT_BOLD.
 </para>
 
 <!-- ##### ARG GtkTextTag:stretch ##### -->
 <para>
-
+Font stretch as a #PangoStretch, e.g. #PANGO_STRETCH_CONDENSED.
 </para>
 
 <!-- ##### ARG GtkTextTag:size ##### -->
 <para>
-
+Font size as an integer in Pango units, as for
+pango_font_description_set_size(). Using the "scale" property is
+usually better.
 </para>
 
 <!-- ##### ARG GtkTextTag:size-points ##### -->
 <para>
-
+Font size as a double, in points. Using the "scale" property is
+usually better.
 </para>
 
 <!-- ##### ARG GtkTextTag:scale ##### -->
 <para>
-
+Font size as a scale factor relative to the default font size.
+This properly adapts to theme changes etc. so is recommended. 
+Pango predefines some scales such as #PANGO_SCALE_X_LARGE.
 </para>
 
 <!-- ##### ARG GtkTextTag:pixels-above-lines ##### -->
@@ -311,7 +334,7 @@ Pixel width of left margin of the text.
 
 <!-- ##### ARG GtkTextTag:indent ##### -->
 <para>
-
+Pixel size of paragraph indentation; may be negative.
 </para>
 
 <!-- ##### ARG GtkTextTag:strikethrough ##### -->
@@ -331,7 +354,8 @@ A #PangoUnderline value.
 
 <!-- ##### ARG GtkTextTag:rise ##### -->
 <para>
-
+Used for superscript or subscript; value is given in pixels.
+Negative rise means subscript.
 </para>
 
 <!-- ##### ARG GtkTextTag:background-full-height ##### -->
@@ -356,17 +380,19 @@ applies to the first character in a paragraph.
 
 <!-- ##### ARG GtkTextTag:invisible ##### -->
 <para>
-
+Not implemented in GTK 2.0. Would make text disappear.
 </para>
 
 <!-- ##### ARG GtkTextTag:background-set ##### -->
 <para>
-
+If %TRUE, honor the background property. Automatically toggled
+on when setting the background property.
 </para>
 
 <!-- ##### ARG GtkTextTag:foreground-set ##### -->
 <para>
-
+If %TRUE, honor the foreground property. Automatically toggled
+on when setting the foreground property.
 </para>
 
 <!-- ##### ARG GtkTextTag:background-stipple-set ##### -->
index 5b9c1466bf86c5f936665f7ff884a61b64d07299..2ab322e526a93b737ddf0235bc5396ed79f77ff1 100644 (file)
@@ -4823,7 +4823,7 @@ gtk_text_view_ensure_layout (GtkTextView *text_view)
  * Obtains a copy of the default text attributes. These are the
  * attributes used for text unless a tag overrides them.
  * You'd typically pass the default attributes in to
- * gtk_text_tag_get_attributes() in order to get the
+ * gtk_text_iter_get_attributes() in order to get the
  * attributes in effect at a given text position.
  *
  * The return value is a copy owned by the caller of this function,